package com.beijiteshop.shop.ui.address.repo

import com.beijiteshop.libcommon.network.ext.BaseRsp
import com.beijiteshop.libcommon.network.ext.ResultRsp
import com.beijiteshop.shop.model.api.response.AddressBean
import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST

/**
 * @Author LiaoZhongKai
 * @Date 2021/3/9 19:36
 * @Description
 */
interface AddressService {

    /**
     * 获取地址列表
     */
    @GET("/api/address/getaddress")
    fun getAddressList(): Call<BaseRsp<List<AddressBean>>>

    /**
     * 添加地址
     */
    @POST("/api/address/add")
    fun addAddress(@Body addressBean: AddressBean): Call<ResultRsp>

    /**
     * 更新地址
     */
    @POST("/api/address/update")
    fun updateAddress(@Body addressBean: AddressBean): Call<ResultRsp>

    /**
     * 删除地址
     */
    @POST("/api/address/delete")
    fun deleteAddress(@Body id: String): Call<ResultRsp>
}